package cn.edu.hbsi.domain;

import java.util.List;

public class Product
{
    private Integer pId;
    private String pName;
    private Double pPrice;
    private List<Orders> orders;

    public Product() {
    }

    public Product(String pName, Double pPrice) {
        this.pName = pName;
        this.pPrice = pPrice;
    }

    public Product(Integer pId, String pName, Double pPrice) {
        this.pId = pId;
        this.pName = pName;
        this.pPrice = pPrice;
    }

    public Product(Integer pId, String pName, Double pPrice, List<Orders> orders) {
        this.pId = pId;
        this.pName = pName;
        this.pPrice = pPrice;
        this.orders = orders;
    }

    public Integer getpId() {
        return pId;
    }

    public void setpId(Integer pId) {
        this.pId = pId;
    }

    public String getpName() {
        return pName;
    }

    public void setpName(String pName) {
        this.pName = pName;
    }

    public Double getpPrice() {
        return pPrice;
    }

    public void setpPrice(Double pPrice) {
        this.pPrice = pPrice;
    }

    public List<Orders> getOrders() {
        return orders;
    }

    public void setOrders(List<Orders> orders) {
        this.orders = orders;
    }

    @Override
    public String toString() {
        return "Product{" +
                "pId=" + pId +
                ", pName='" + pName + '\'' +
                ", pPrice=" + pPrice +
                ", orders=" + orders +
                '}';
    }
}